import java.util.Arrays;
import java.util.LinkedList;
import java.util.Queue;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int k = in.nextInt();
        int[] a = new int[n];
        for(int i = 0; i < n; i++) {
            a[i] = in.nextInt();
        }

        Arrays.sort(a);
        int i = n - 1;
        while(k > 0 && i >= 0) {
            if(a[i] % 2 == 0) {
                a[i] /= 2;
                k--;
                Arrays.sort(a);
            }else {
                i--;
            }
        }

        int sum = 0;
        for(int j = 0; j < n; j++) {
            sum += a[j];
        }
        System.out.println(sum);
    }
    public static void main5(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int x = in.nextInt();
        int[] a = new int[n];
        for(int i = 0; i < n; i++) {
            a[i] = in.nextInt();
        }

        Queue<Integer> queue = new LinkedList<>();
        int l = 0;
        int r = -1;
        int lTmp = 0;
        int rTmp = 0;
        int sum = 0;
        while(rTmp < n) {
            if (sum < x) {
                queue.offer(a[rTmp]);
                sum += a[rTmp];
            } else {
                if (r == -1) {
                    r = rTmp;
                } else if (r - l > rTmp - lTmp) {
                    r = rTmp;
                    l = lTmp;
                }
                sum -= queue.poll();
                lTmp++;
            }
            if(sum < x) {
                rTmp++;
            }
        }
        System.out.println((l+1) + " " + (r+1));
    }

    public static void main4(String[] args) {
        String str = "College English Test";
        StringBuffer stringBuffer = new StringBuffer();
        char ch = Character.toUpperCase(str.charAt(0));
        stringBuffer.append(ch);
        for(int i = 1; i < str.length(); i++) {
            char chTmp = str.charAt(i);
            if(chTmp == ' ') {
                char tmp = Character.toUpperCase(str.charAt(i+1));
                stringBuffer.append(tmp);
            }
        }
        System.out.println(stringBuffer);
    }
    public static void main3(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        String str1 = in.next();
        String str2 = in.next();
        in.nextLine();
        String[] strs = new String[n];
        for(int i = 0; i < n; i++) {
            strs[i] = in.nextLine();
        }

        int i1 = -1;
        int i2 = -1;
        for(int i = 0; i < n; i++) {
            if(strs[i].equals(str1)) {
                if(i1 == -1 || i2 == -1 || Math.abs(i - i2) < Math.abs(i1 - i2)) {
                    i1 = i;
                }
            }
            if(strs[i].equals(str2)) {
                if(i1 == -1 || i2 == -1 || Math.abs(i - i1) < Math.abs(i1 - i2)) {
                    i2 = i;
                }
            }
        }
        if(i1 == -1 || i2 == -1) {
            System.out.println(-1);
        }else {
            System.out.println(Math.abs(i1 - i2));
        }
    }
    public static void main1(String[] args) {
        Scanner in = new Scanner(System.in);
        float a = in.nextFloat();
        String str = in.next();
        char b = str.charAt(0);
        int price = 20;
        if(a < 1) {
            if(b == 'y') {
                price += 5;
            }
        }else {
            if((int)a - a == 0) {
                price += (int)a - 1;
            }else {
                price += (int)a;
            }
            if(b == 'y') {
                price += 5;
            }
        }
        System.out.println(price);
    }

    public static void main2(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int[] cost = new int[n];
        for(int i = 0; i < n; i++) {
            cost[i] = in.nextInt();
        }

        int[] dp = new int[n+1];
        dp[0] = dp[1] = 0;
        for(int i = 2; i <= n; i++) {
            dp[i] = Math.min(dp[i-1] + cost[i-1], dp[i-2] + cost[i-2]);
        }
        System.out.println(dp[n]);
    }
}